{template "header.html"}

<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {dr_form_hidden()}
    <div class="portlet bordered light ">
        <div class="portlet-body">
            <div class="tab-content">

                <div class="form-body">
                    <table class="table table-striped table-bordered table-hover table-checkable dataTable">
                        <thead>
                        <tr class="heading">
                            <th class="myselect">
                                {dr_lang('显示')}
                            </th>
                            <th width="180"> {dr_lang('字段')} </th>
                            <th width="100"> {dr_lang('类别')} </th>
                            <th width="150"> {dr_lang('名称')} </th>
                            <th width="100"> {dr_lang('宽度')} </th>
                            <th width="140"> {dr_lang('对其方式')} </th>
                            <th> {dr_lang('回调方法')} </th>
                        </tr>
                        </thead>
                        <tbody class="field-sort-items">
                        {loop $field $n}
                        {php $t=$my_field[$n];}
                        <tr class="odd gradeX">
                            <td class="myselect">
                                <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
                                    <input type="checkbox" class="checkboxes" name="data[{$n}][use]" value="1" {if $list_field[$n]['use']} checked{/if} />
                                    <span></span>
                                </label>
                            </td>
                            <td>{php echo $t.name ? $t.name : $n;} ({$n})</td>
                            <td>{$t.fieldtype}</td>
                            <td><input class="form-control" type="text" name="data[{$n}][name]" value="{php echo $list_field[$n]['name'] ? htmlspecialchars($list_field[$n]['name']) : $t.name}" /></td>
                            <td> <input class="form-control" type="text" name="data[{$n}][width]" value="{htmlspecialchars((string)$list_field[$n]['width'])}" /></td>
                            <td><input type="checkbox" name="data[{$n}][center]" {if $list_field[$n]['center']} checked{/if} value="1"  data-on-text="{dr_lang('居中')}" data-off-text="{dr_lang('默认')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                            </td>
                            <td> <div class="input-group" style="width:250px">
                                        <span class="input-group-btn">
                                            <a class="btn btn-success" href="javascript:dr_call_alert();">{dr_lang('回调')}</a>
                                        </span>
                                <input class="form-control" type="text" name="data[{$n}][func]" value="{htmlspecialchars((string)$list_field[$n]['func'])}" />
                            </div></td>
                        </tr>
                        {/loop}
                        </tbody>
                    </table>

                </div>

            </div>
        </div>
    </div>
    </div>

</form>

{template "footer.html"}